<script setup lang="ts">
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
import local from "@/utils/local";
import { useUCenterStore } from '@/stores/uCenter'
import { ref , getCurrentInstance } from 'vue';
const { proxy } = getCurrentInstance();
const store = useUCenterStore()
onLaunch(async () => {
  uni.hideTabBar({
	  success:()=>{
		  console.log("success")
	  },
	  fail:()=>{
		  console.log("fail")
	  }
  })
  local.setCache('memberInfo',{})
  
  store.$patch((state) => {
    state.memberInfo = {}
  })
  const isCheckOutLogin =  uni.getStorageSync('isCheckOutLogin');
  if(!isCheckOutLogin){
    await local.miniAppFetchApiCheckLogin().then(res => {
      store.$patch((state) => {
        state.memberInfo = res
      })
    })
  }
  // 获取vue3全局对象
  console.info('proxy',proxy)
  // 放行同步方法
  proxy.$isResolve();
});
onShow(() => {
  console.log("App Show");
});
onHide(() => {
  console.log("App Hide");
});
</script>
<style>
@import url('styles/tailwind.css');
page{
  background-color: #f5f5f5;
  background-image:url('https://images.sijiyoufu.com/static/imgs/project/image1.jpg?v=11000');
  background-size:cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: top;
}
.bg-line-color{
  background:linear-gradient(136deg,rgb(245,238,182) 0%,  rgb(152 116 69) 100%) !important;
}
.border-line-color{
  border-image:linear-gradient(136deg,rgb(245,238,182) 0%,  rgb(152 116 69) 100%) !important;
}
.uv-tabbar__content{
    background-color: hsl(0deg 0% 100% / 90%) !important;
    border-color:hsl(0deg 0% 100% / 90%) !important;
}
/* .uv-tabbar__content__item-wrapper .uv-tabbar-item:nth-child(3) .uv-tabbar-item__text,.uv-tabbar__content__item-wrapper .uv-tabbar-item:nth-child(4) .uv-tabbar-item__text{
    color:#999 !important
} */
.uv-tabbar__content{background-color: #581107 !important;}
</style>
